package Demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-03-05
 * Time: 21:54
 */
interface IA {
    void testA();
}

interface IB {
    void testB();
}

//通过implements实现多个接口
class TestDemo implements IA,IB{
    @Override
    public void testA() {
        System.out.println("testA");
    }

    @Override
    public void testB() {
        System.out.println("testB");
    }
}

public class Test2 {
    public static void main(String[] args) {
        TestDemo testDemo = new TestDemo();
        testDemo.testA();
        testDemo.testB();
    }

}
